#define _CRT_SECURE_NO_WARNINGS 1
#include"PaiXu.h"

void TestMaoPaoPaixu() {
	int arr[] = { 9,1,2,5,7,4,8,6,3,5 };

	MaoPaoPaiXu(arr, sizeof(arr) / sizeof(int));
	MaoPaoPaiXu(arr, sizeof(arr) / sizeof(int));
	DaYing(arr, sizeof(arr) / sizeof(int));
}

void TestXuanZhePaiXu() {
	int arr[] = { 9,1,2,5,7,4,8,6,3,};

	XuanZhePaiXu(arr, sizeof(arr) / sizeof(int));
	DaYing(arr, sizeof(arr) / sizeof(int));
}

void TestChaRuPaiXu() {
	int arr[] = { 9,1,2,5,7,4,8,6,3, };

	ChaRuPaiXu(arr, sizeof(arr) / sizeof(int));
	DaYing(arr, sizeof(arr) / sizeof(int));
}

void TestXiErPaiXu() {
	int arr[] = { 9,1,2,5,7,4,8,6,3,6,2,3,56,3,1,1,45,7,4,3,55,3,3,12,34,2,33,55,223 };

	XiErPaiXu(arr, sizeof(arr) / sizeof(int));
	DaYing(arr, sizeof(arr) / sizeof(int));
}

void TestDuiPaiXu() {
	int arr[] = { 9,1,2,5,7,4,8,6,3,6,2,3,56,3,1,1,45,7,4,3,55,3,3,12,34,2,33,55,223 };

	DuiPaiXu(arr, sizeof(arr) / sizeof(int));
	DaYing(arr, sizeof(arr) / sizeof(int));
}

void  TestKuaiShuPaiXu() {
	int arr[] = { 9,1,2,5,7,4,8,6,3,6,2,3,56,3,1,1,45,7,4,3,55,3,3,12,34,2,33,55,223 };

	//int mid = SanShuQuZhong(arr, 0, sizeof(arr) / sizeof(int) - 1);
	KuaiShuPaiXu(arr,0,sizeof(arr) / sizeof(int) - 1);
	DaYing(arr, sizeof(arr) / sizeof(int));
}

void TestKuaiShuPaiXu_1() {
	int arr[] = { 9,1,2,5,7,4,8,6,3,11,33,66,222,22,22,22,5,26,26,452};

	KuaiShuPaiXu_1(arr, 0, sizeof(arr) / sizeof(int) - 1);
	DaYing(arr, sizeof(arr) / sizeof(int));
}

void TestKuaiShuPaiXu_2() {
	int arr[] = { 9,1,2,5,7,4,8,6,3,11,232,456,2,2,4,5,555,322,25,14,35,347,2,14};

	KuaiShuPaiXu_2(arr, 0, sizeof(arr) / sizeof(int) - 1);
	DaYing(arr, sizeof(arr) / sizeof(int));

}

void TestGuiBingPaiXu() {
	int arr[] = { 9,1,2,5,7,4,8,6,3,11,232,456,2,2,4,5,555,322,25,14,35,347,2,14 };

	GuiBingPaiXu(arr, sizeof(arr) / sizeof(int));
	DaYing(arr, sizeof(arr) / sizeof(int));

}

void TestJiShuPaiXu() {
	int arr[] = { 9,1,2,5,7,4,8,6,3,11,232,456,2,2,4,5,555,322,25,14,35,347,2,14 };

	JiShuPaiXu(arr, sizeof(arr) / sizeof(int));
	DaYing(arr, sizeof(arr) / sizeof(int));

}
int main() {

	//TestMaoPaoPaixu();
	//TestXuanZhePaiXu();
	//TestChaRuPaiXu();
	//TestXiErPaiXu();
	//TestDuiPaiXu();
	//TestKuaiShuPaiXu();
	//TestKuaiShuPaiXu_1();
	//TestKuaiShuPaiXu_2();
	//TestGuiBingPaiXu();
	TestJiShuPaiXu();


}

